package com.liu.recruit.exctption;

import com.liu.common.entity.Result;
import com.liu.common.status.CodeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
@Slf4j
public class MyExceptionHandler {

    @ExceptionHandler(value = Exception.class)
  public Result exception(Exception e ){

        return new Result(false, CodeEnum.ERROR.getCode(),e.getMessage());
  }




}
